﻿@{
    ViewBag.Title = "订单品名查询列表";
    Layout = "~/Views/Shared/_LayoutList.cshtml"; 
}
@(       
 Html.nbGridFor<MaterialOrderItemView>(s =>
 {
     s.layoutH(120);
     s.Action("List");
     s.ExtParam(new { date = DateTime.Today.AddDays(1) });
     s.SummaryTemplate("采购数：<b>${TotalWeight}</b> 斤，预计金额：<b>${Amount}</b> 元");
     s.Columns(c =>
     {
         c.Bind(m => m.Id).IsKey();
         c.BindDateTime(m => m.Date).Width(80).Title("订单日期").AsSearch();
         c.BindEnum(m => m.BigClass, "BigClass").Title("品名大类").Width(80).AsSearch();
         c.BindEnum(m => m.Category, "MaterialCategory").Title("品名分类").Width(80);
         c.Bind(m => m.Code).Width(80).Title("编号").AsQuery().AsSearch();
         c.Bind(m => m.Name).Width(80).Title("名称").AsQuery().AsSearch();
         c.Bind(m => m.Price).Width(80).Title("预计单价").Align(GridAlign.Right).AsSearch(SearchControlType.NumberBlock);
         c.BindEnum(m => m.Unit, "MaterialUnit").Width(80).Title("单位");
         c.Bind(m => m.TotalWeight).Width(80).Title("采购数").Align(GridAlign.Right).Summary(SummaryType.Sum).AsSearch(SearchControlType.NumberBlock);
         c.Bind(m => m.Amount).Width(80).Title("预计金额").Align(GridAlign.Right).Summary(SummaryType.Sum).AsSearch(SearchControlType.NumberBlock);
         c.Bind(m => m.State).Width(80).Title("状态").AsSearch();
     });
 }))
